package com.example.demo.impl;

import com.example.demo.myinterface.Fruit;

public class Apple implements Fruit {
    /**
     * 当前策略匹配规则
     * @param fruitName
     * @return
     */
    @Override
    public boolean matchType(String fruitName) {
        if(fruitName.equals("苹果")){
            return true;
        }
        return false;
    }

    @Override
    public String eat() {
        System.out.println("吃苹果");
        return "吃苹果";
    }
}
